<template>
  <div style="text-align: center;background-color: #f1f1f3;height: 100vh;padding: 0px; margin: 0px;">
    <h1 style="font-size: 50px;">{{ '欢迎您！'+user.name }}</h1>
    <el-descriptions title="个人中心" :column="2" size="40" border>
      <el-descriptions-item>
        <template slot="label">
          <i class=" el-icon-user-solid"></i>
          账号
        </template>
        {{user.username}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-phone"></i>
          电话
        </template>
        {{user.phone}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class=" el-icon-location"></i>
          地址
        </template>
        {{user.address}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class=" el-icon-s-custom"></i>
          角色
        </template>
        <el-tag
            type="success"
            disabled-transitions>{{user.isadmin=='1'?'管理员':'用户'}}</el-tag>

      </el-descriptions-item>

    </el-descriptions>


    <DateUtils></DateUtils>

  </div>
</template>

<script>
import DateUtils from "@/components/DateUtils";
export default {
  name: "Mymes",
  components:{
    DateUtils
  },
  data(){
    return{
      user:{}
    }

  },
  computed:{

  },
  methods:{
    init(){
      this.user = JSON.parse(localStorage.getItem('CurUser'))
      
    }
  },
  created() {
    this.init()
  }

}

</script>

<style scoped>
.el-descriptions{
  width:90%;

  margin: 0 auto;
  text-align: center;
}
</style>